#include <iostream>
#include <signal.h>
#include <string.h>

using namespace std;


int main(int argc, char* argv[])
{
    if(argc == 1)
    {
        cout << "Usage: " << argv[0] << " -sign_number -pid" << endl;
    }

    pid_t pid = atoi(argv[2]);
    int sig = atoi(argv[1] + 1);

    int n = kill(pid, sig);
    if(n != 0)
    {
        cout << "mykill error now! errno: " << errno << " strerror: " << strerror(errno) << endl;
    }
    else
    {
        cout << "kill process success!" << endl;
    }
    return 0;
}